package com.keba.lamp.complaint.vo.result;

import cn.hutool.core.map.MapUtil;
import com.keba.basic.annotation.echo.Echo;
import com.keba.basic.base.entity.Entity;
import com.keba.basic.interfaces.echo.EchoVO;
import com.keba.lamp.model.constant.EchoApi;
import com.keba.lamp.model.constant.EchoDictType;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * 表单查询方法返回值VO
 * 诉讼状案件
 * </p>
 *
 * @author chaowu.wang
 * @date 2025-03-28 22:53:03
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@ToString(callSuper = true)
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
@Builder
@Schema(description = "诉讼状案件")
public class CaseResultVO extends Entity<Long> implements Serializable, EchoVO {

    private static final long serialVersionUID = 1L;

    private Map<String, Object> echoMap = MapUtil.newHashMap();

    @Schema(description = "主键")
    private Long id;

    @Echo(api = EchoApi.BASE_EMPLOYEE_SERVICE_IMPL_CLASS)
    private Long createdBy;
    /**
    * 乐观锁
    */
    @Schema(description = "乐观锁")
    private Integer revision;
    /**
    * 是否删除，0-未删除，1-删除
    */
    @Schema(description = "是否删除，0-未删除，1-删除")
    private Integer isDel;
    /**
    * 租户ID
    */
    @Schema(description = "租户ID")
    private Long tenantId;
    /**
    * 起诉状内容
    */
    @Schema(description = "起诉状内容")
    private String complaintContent;
    /**
    * 案件说明
    */
    @Schema(description = "案件说明")
    private String remark;
    /**
    * 案件名称
    */
    @Schema(description = "案件名称")
    private String caseName;
    /**
    * 案件来源;[00-小程序 02-后台创建]@Echo(api = EchoApi.DICTIONARY_ITEM_FEIGN_CLASS, dictType = EchoDictType.System.CASE_SOURCE)
    */
    @Schema(description = "案件来源")
    @Echo(api = EchoApi.DICTIONARY_ITEM_FEIGN_CLASS, dictType = EchoDictType.System.CASE_SOURCE)
    private String caseSource;
    /**
    * 案件状态;[00-草稿 10-已完成]@Echo(api = EchoApi.DICTIONARY_ITEM_FEIGN_CLASS, dictType = EchoDictType.System.CASE_STATE)
    */
    @Schema(description = "案件状态")
    @Echo(api = EchoApi.DICTIONARY_ITEM_FEIGN_CLASS, dictType = EchoDictType.System.CASE_STATE)
    private String caseState;
    /**
    * 案件类别;[01-贷款 99-其它]@Echo(api = EchoApi.DICTIONARY_ITEM_FEIGN_CLASS, dictType = EchoDictType.System.CASE_TYPE)
    */
    @Schema(description = "案件类别")
    @Echo(api = EchoApi.DICTIONARY_ITEM_FEIGN_CLASS, dictType = EchoDictType.System.CASE_TYPE)
    private String caseType;
    /**
    * 业务类型[01-起诉状，02-答辩状 ]@Echo(api = EchoApi.DICTIONARY_ITEM_FEIGN_CLASS, dictType = EchoDictType.System.BIZ_TYPE)
    */
    @Schema(description = "业务类型[01-起诉状，02-答辩状 ]@Echo(api = EchoApi.DICTIONARY_ITEM_FEIGN_CLASS, dictType = EchoDictType.System.BIZ_TYPE)")
    @Echo(api = EchoApi.DICTIONARY_ITEM_FEIGN_CLASS, dictType = EchoDictType.System.BIZ_TYPE)
    private String bizType;
    @Schema(description = "业务类型[01-个人客户案件 02-渠道客户案件]")
    @Echo(api = EchoApi.DICTIONARY_ITEM_FEIGN_CLASS, dictType = EchoDictType.System.TENANT_BUSINESS_TYPE)
    private String businessType;

    @Schema(description = "点击生成诉讼状次数")
    private Integer clickNum;
    @Schema(description = "最大点击生成诉讼状次数")
    private Integer maxClickNum;

    @Schema(description = "证据列表")
    private List<EvidenceResultVO> evidenceResultVOList;

    @Schema(description = "案件说明文件")
    private List<CaseFileResultVO> caseRemarkFileResultVOList;

    @Schema(description = "起诉状文件（签字版）")
    private List<CaseFileResultVO> suitFileList;
    @Schema(description = "证据目录（签字版）")
    private List<CaseFileResultVO> evidenceSignFileList;
    @Schema(description = "委托代理人手续和身份证明")
    private List<CaseFileResultVO> identityMaterialFileList;
    @Schema(description = "送达地址确认书")
    private List<CaseFileResultVO> deliveryAddressFileList;
    @Schema(description = "银行结算确认书")
    private List<CaseFileResultVO> settleConfirmFileList;
    @Schema(description = "其他材料")
    private List<CaseFileResultVO> otherFileList;

    @Schema(description = "原告")
    private List<PlaintffResultVO> plaintffResultVOList;

    @Schema(description = "被告")
    private List<DefendantResultVO> defendantResultVOList;

    @Schema(description = "原告代理人")
    private List<AgentResultVO> plaintffAgentResultVOList;

    @Schema(description = "被告代理人")
    private List<AgentResultVO> defendantAgentResultVOList;

    @Schema(description = "起诉状上一次生成时间")
    private LocalDateTime lastGenerateTime;
    @Schema(description = "是否可以编辑")
    private Boolean enableUpdate;
    @Schema(description = "是否可以点击生成起诉状")
    private Boolean enableClickGenerate;
    @Schema(description = "渠道客户ID")
    private Long channelCustomerId;
    @Schema(description = "渠道客户名称")
    private String channelCustomer;
    @Schema(description = "分享人ID")
    private Long sharerUserId;
    @Schema(description = "谈案专员")
    private String sharedUserName;
    @Schema(description = "分享手机号")
    private String shareTel;
    /**
     * 三方平台 [01咸鱼、02天猫、03抖音、04快手、20自营]@Echo(api = EchoApi.DICTIONARY_ITEM_FEIGN_CLASS, dictType = EchoDictType.System.THIRD_PLATFORM)
     */
    @Schema(description = "三方平台 [01咸鱼、02天猫、03抖音、04快手、20自营]@Echo(api = EchoApi.DICTIONARY_ITEM_FEIGN_CLASS, dictType = EchoDictType.System.THIRD_PLATFORM)")
    @Echo(api = EchoApi.DICTIONARY_ITEM_FEIGN_CLASS, dictType = EchoDictType.System.THIRD_PLATFORM)
    private String thirdPlatform;
    /**
     * 客服人员
     */
    @Schema(description = "客服人员")
    @Echo(api = EchoApi.BASE_EMPLOYEE_SERVICE_IMPL_CLASS)
    private Long customerService;
    /**
     * 做单员
     */
    @Schema(description = "做单员")
    @Echo(api = EchoApi.BASE_EMPLOYEE_SERVICE_IMPL_CLASS)
    private Long orderProcessor;

    /**
     * 法院名称
     */
    @Schema(description = "法院名称")
    private String courtName;
    /**
     * 标的金额
     */
    @Schema(description = "标的金额")
    private BigDecimal caseAmount;
    /**
     * 案件备注（不是[案件说明]字段，【案件说明】字段用的是remark）
     */
    @Schema(description = "案件备注（不是[案件说明]字段，【案件说明】字段用的是remark）")
    private String caseRemark;

    @Schema(description = "法院区域ID")
    private Long areaId;

    @Schema(description = "其他材料")
    private List<DocTemplateResultVO> docTemplateResultVOList;
}
